package concurrent;

/**
 * Created by xiao on 2017/12/17 下午10:35.
 */
public class MxConsumer implements Runnable {

    private MxQueueBuffer buffer;

    public MxConsumer(MxQueueBuffer buffer) {
        this.buffer = buffer;
        new Thread(this, "Consumer").start();
    }

    @Override
    public void run() {
        while (true) {
            System.out.println("Consumer: " + buffer.get());
        }
    }
}
